﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace MvcEngine.Core.Helpers
{
    public static class SessionHelper
    {
        public static MarkupMode Markup 
        {
            get 
            {
                return HttpContext.Current.Session[Constants.UserSettings.MarkupMode] == null ?
                    MarkupMode.View : (MarkupMode)HttpContext.Current.Session[Constants.UserSettings.MarkupMode];
            }

            set 
            {
                HttpContext.Current.Session[Constants.UserSettings.MarkupMode] = value; 
            } 
        }

        public static bool AdminPanelVisible
        {
            get
            {
                return HttpContext.Current.Session[Constants.UserSettings.AdminPanel] == null ?
                    false : (bool)HttpContext.Current.Session[Constants.UserSettings.AdminPanel];
            }

            set
            {
                HttpContext.Current.Session[Constants.UserSettings.AdminPanel] = value;
            }
        }
    }
}
